package com.ruoyi.exam.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.exam.domain.ExamRandomPracticeQuestion;
import com.ruoyi.exam.vo.ExamRandomPracticeQuestionVo;
import com.ruoyi.exam.mapper.ExamRandomPracticeQuestionMapper;
import com.ruoyi.exam.service.IExamRandomPracticeQuestionService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 练习题目Service业务层处理
 *
 * @author Tellsea
 * @date 2025-07-28
 */
@Service
public class ExamRandomPracticeQuestionServiceImpl extends ServiceImpl<ExamRandomPracticeQuestionMapper, ExamRandomPracticeQuestion> implements IExamRandomPracticeQuestionService {

    @Override
    public TableDataInfo<ExamRandomPracticeQuestionVo> queryList(ExamRandomPracticeQuestionVo entity) {
        return PageUtils.buildDataInfo(this.baseMapper.queryList(PageUtils.buildPage(), entity));
    }

    @Override
    public List<ExamRandomPracticeQuestionVo> queryAll(ExamRandomPracticeQuestionVo entity) {
        return this.baseMapper.queryList(entity);
    }

    @Override
    public ExamRandomPracticeQuestionVo queryById(Long practiceQuestionId) {
        return this.baseMapper.queryById(practiceQuestionId);
    }
}
